In moving picture coding processes, the amount of data is generally reduced using redundancy of the moving pictures in spatial and temporal directions. Here, a method using the redundancy in the spatial direction is generally represented by the transformation into the frequency domain. A method using the redundancy in the temporal direction is represented by an inter-picture prediction (hereinafter referred to as inter prediction) coding process. In the inter prediction coding process, when coding a certain picture, a picture which has been already coded and is located, in display time order, before or after the current picture to be coded is used as a reference picture. Subsequently, a motion vector is estimated through motion estimation of the current picture with respect to the reference picture, and a difference is calculated between image data of the current picture and prediction picture data resulting from motion compensation based on the motion vector, to remove the redundancy in the temporal direction.
In the moving picture coding scheme called H.264, which has already been standardized, three types of pictures: I-picture, P-picture, and B-picture, are used to reduce the amount of data. The I-picture is a picture on which no inter prediction coding process is performed, that is, on which only an intra-picture prediction (hereinafter referred to as intra prediction) coding process is performed. The P-picture is a picture on which the inter prediction coding process is performed with reference to only one picture which has been already coded and is located before or after the current picture in display time order. The B-picture is a picture on which the inter prediction coding process is performed with reference to two pictures which have been already coded and is located before or after the current picture in display time order.
Furthermore, in the moving picture coding method known as H.264, as an inter prediction coding mode for each current block in a B-picture, there is a motion vector estimation mode of coding (a) difference values of image data between prediction image data and image data of the current block and (b) a motion vector used in generating the prediction image data, a direct mode in which only difference values of the image data are coded and a motion vector is predicted from a surrounding block, and a skip mode in which neither difference values of image data nor a motion vector is coded and a prediction image of the position indicating a motion vector predicted from a surrounding block and the like is directly determined as a decoded image.
At the motion vector estimation mode of the B-picture, either bi-directional prediction or uni-directional prediction is selected as a prediction direction of the current block. In the bi-directional prediction, a prediction image is generated with reference to two pictures which have been already coded and are located before or after the current picture. On the other hand, in the uni-directional prediction, a prediction image is generated with reference to one picture which has been already coded and is located before or after the current picture.
Meanwhile, in the direct mode of the B-picture, the prediction direction of the current block to be coded is determined according to a prediction mode of the surrounding blocks and the like. A specific example is described with reference to FIG. 42. In FIG. 42, a coded block on the left neighboring of the current block to be coded is determined as a neighboring block A, a coded block above the neighboring of the current block is determined as a neighboring block B, and a coded block on the top right neighboring of the current block is determined as a neighboring block C. Moreover, the neighboring block A performs bi-directional prediction, the neighboring block B performs uni-directional prediction, and the neighboring block C performs uni-directional prediction. The prediction direction of the current block to be coded in a direct mode is a bi-directional prediction when the neighboring blocks include at least one block which has been coded using bi-directional prediction. In the case of FIG. 42, a bi-directional prediction is selected for the prediction direction of the current block to be coded.